<%  
   var previous = "", res, current, title;
%>
<div id='selected'>
    <% for(var i =0; i < selected.length; i++){%>
		<%  current = selected[i];
 			title = (current.title ? current.title: current.name);
			res = calculateDisplay(previous, title)%>
	    <a href="#&who=<%=current.name%>" class='selected choice <%=current.className%>' style="padding-left: <%= res.length * 20%>px">
	    	<span class='remove' title="close"></span>
			<%=res.name.replace("jQuery","$")%>
			
		</a>
		<% previous = title%>
	<%}%>
  	
</div>
<div id='results' style="display: <%= hide? 'none' : 'block'%>">

    <% for(var i =0; i < list.length; i++){%>
		<% current = list[i];
		   if(current.hide){ continue; }
		   title = (current.title ? current.title: current.name);
           res = calculateDisplay(previous, title)%>
	    <a href="#&who=<%=current.name%>" class='result choice <%=current.className%>' style="padding-left: <%= res.length * 20%>px">
	    	<%=res.name.replace("jQuery","$")%>
		</a>
		<% previous = title%>
	<%}%>

</div>


